import { WinsleiLogManager } from '@winslei/winsleilog'
import display from '@ohos.display';

const TAG = 'DisplayUtil'

export class DisplayUtil {
  defaultDisplay = display.getDefaultDisplaySync();

  constructor() {
    WinsleiLogManager.hilogIWithTag(TAG, `constructor`)
  }

  width(): number {
    WinsleiLogManager.hilogIWithTag(TAG, `defaultDisplay.width ${this.defaultDisplay.width}`)
    return this.defaultDisplay.width
  }

  height(): number {
    WinsleiLogManager.hilogIWithTag(TAG, `defaultDisplay.height ${this.defaultDisplay.height}`)
    return this.defaultDisplay.height
  }
}